const TokenKey = 'heima-toutiao-token'
// 保存token
const saveToken = tokenObj => {
  localStorage.setItem(TokenKey, JSON.stringify(tokenObj))
}

// 删除token
const removeToken = () => {
  localStorage.removeItem(TokenKey)
}
// 读取token
const getToken = () => {
  return JSON.parse(localStorage.getItem(TokenKey))
}
// 暴露出去
export { saveToken, removeToken, getToken }
